package com.gs.cd.service.resource.service;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.gs.cd.model.resource.SysSale;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author seven
 * @since 2020-12-22
 */
public interface SysSaleService extends IService<SysSale> {

    /**
     * 通过code获取
     *
     * @param saleCode
     * @return
     */
    SysSale getByCode(String saleCode);

    /**
     * 删除销售单元，附带删除所有相关
     *
     * @param saleCode
     * @return
     */
    boolean removeSaleAndRelationsByCode(String saleCode);

    boolean removeSaleAndRelationsById(String id);

    /**
     * 通过projectId获取销售单元
     * @param projectId
     * @return
     */
    List<SysSale> listByProjectId(String projectId);
}
